package com.ruoyi.manufacturer;

import com.ruoyi.base.domain.BaseDevice;
import lombok.Data;

/**
 * 控制指令
 */
@Data
public class ControlVo {

    /** 设备ID **/
    private Long deviceId;

    /** 设备信息，业务填充 **/
    private BaseDevice device;

    /** 指令代码 **/
    private String command;

    /** 参数 **/
    private String value;

    public static ControlVo create(Long deviceId, String command){
        ControlVo vo = new ControlVo();
        vo.deviceId = deviceId;
        vo.command = command;
        return vo;
    }

    public static ControlVo create(Long deviceId, String command, String value){
        ControlVo vo = new ControlVo();
        vo.deviceId = deviceId;
        vo.command = command;
        vo.value = value;
        return vo;
    }
}
